
#include <xmc4500/can_hw.h>
#include <xmc4500/can_hw.h>
#include <xmc4500/encoder_hw.h>
#include <xmc4500/int.h>
#include <xmc4500/io.h>
#include <xmc4500/types_local.h>
#include "../sched/sched.h"
#include "../switch/switch.h"
#include "../adc/adc.h"
#include "../tlf/tlf.h"
/*

*/
volatile u32 u32OsTaskCnt;


/*---------------------------------------------------------------------
  Function Name: task_timer_1ms
  Description:   task timer interrupt every 1ms
  Inputs:        None
  Returns:       None
-----------------------------------------------------------------------*/

void task_timer_1ms()
{
    switch_inputs_sample();
    receive_can_messages_tic();
    process_can_received_messages_tic();
    encoder_service();
    calc_speed_qei();
    sched_run_1ms();
}
/*---------------------------------------------------------------------
  Function Name: task_timer_10ms
  Description:   task timer interrupt every 10ms
  Inputs:        None
  Returns:       None
-----------------------------------------------------------------------*/

void task_timer_10ms()
{
    adc_tic();
    tlf_service_10ms();
    sched_run_10ms();
}
/*---------------------------------------------------------------------
  Function Name: task_timer_100ms
  Description:   task timer interrupt every 100ms
  Inputs:        None
  Returns:       None
-----------------------------------------------------------------------*/

void task_timer_100ms()
{
    sched_run_100ms();
}

/*---------------------------------------------------------------------
  Function Name: sys_tick_int
  Description:   systic handler every 100us
  Inputs:        None
  Returns:       None
-----------------------------------------------------------------------*/
void sys_tick_int()
{
    calc_position_qei();
    u32OsTaskCnt++;
}




